import { createRouter, createWebHistory } from 'vue-router'
import Login from '../pages/Login/Login.vue'
import MyPage from '../pages/MyPage/MyPage.vue'
import Recommend from '../pages/Recommend/Recommend.vue'
import Search from '../pages/Search/Search.vue'
import PostDetail from '../pages/Message/PostDetail.vue'
import Upload from '@/pages/Message/Upload.vue'
// import AdminDashboard from '../pages/AdminDashboard.vue'

const routes = [
  { path: '/', redirect: '/login' },
  { path: '/login', component: Login },
  { path: '/my', component: MyPage },
  { path: '/recommend', component: Recommend },
  { path: '/search', component: Search },
    { path: '/post/:id', name: 'post-detail', component: PostDetail },
  {path: '/upload', component: Upload }
//   { path: '/admin', component: AdminDashboard }
]

export const router = createRouter({
  history: createWebHistory(),
  routes,
})
